﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HeadFirst.SimpleFactory
{
    class CalcBusiness
    {
        public static BaseOperation CreateOperation(string operationType)
        {
            switch (operationType)
            {
                case "+":
                    return new AddOperation();
                case "-":
                    return new SubOperation();
                case "*":
                    return new MultiOperation();
                case "/":
                    return new DivisionOperation();
                default:
                    return new NoneOperation();
            }
        }
    }
}
